import { createApp } from 'vue'
import { createPinia } from 'pinia'
import App from './App.vue'
import router from './router'
import '@/styles/common.scss'
import piniaPluginPersistedstate from 'pinia-plugin-persistedstate'
// 引入懒加载指令插件并且注册
import { lazyPlugin } from '@/directives/index.js'
// 引入详情页组件
import { componentPlugin } from '@/components/index.js'
const app = createApp(App)

const pinia = createPinia()
pinia.use(piniaPluginPersistedstate)
app.use(componentPlugin)
app.use(pinia)
app.use(router)
app.use(lazyPlugin)
app.mount('#app')

